/**
 * Created by chengke on 2018/2/28.
 */

let Sequelize = require('sequelize');

let sequelize = require('./db.js').webAccount;

module.exports = sequelize.define('operation_record', {
    id: {
        comment: '主键',
        primaryKey: true,
        type: Sequelize.INTEGER
    },
    userId: {
        type: Sequelize.STRING,
        field: 'user_id'
    },
    planId: {
        type: Sequelize.STRING,
        field: 'plan_id'
    },
    unitId: {
        type: Sequelize.STRING,
        field: 'unit_id'
    },
    optType: {
        type: Sequelize.STRING,
        field: 'opt_type'
    },
    newValue: {
        type: Sequelize.STRING,
        field: 'new_value'
    },
    optLevel: {
        type: Sequelize.STRING,
        field: 'opt_level'
    },
    oldValue: {
        type: Sequelize.STRING,
        field: 'old_value'
    },
    optObj: {
        type: Sequelize.STRING,
        field: 'opt_obj'
    },
    optContent: {
        type: Sequelize.STRING,
        field: 'opt_content'
    },
    optTime: {
        type: Sequelize.STRING,
        field: 'opt_time'
    }
}, {
    underscored: true,
    freezeTableName: true
});